<?php

/**
 * Advantages form base class.
 *
 * @method Advantages getObject() Returns the current form's model object
 *
 * @package    rpgcom
 * @subpackage form
 * @author     Your name here
 */
abstract class BaseAdvantagesForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'idAdvantages'  => new sfWidgetFormInputHidden(),
      'size'          => new sfWidgetFormInputText(),
      'speed'         => new sfWidgetFormInputText(),
      'initiativeMod' => new sfWidgetFormInputText(),
      'defense'       => new sfWidgetFormInputText(),
      'armor'         => new sfWidgetFormInputText(),
      'health'        => new sfWidgetFormInputText(),
      'willpower'     => new sfWidgetFormInputText(),
      'morality'      => new sfWidgetFormInputText(),
      'hValue'        => new sfWidgetFormInputText(),
      'wValue'        => new sfWidgetFormInputText(),
    ));

    $this->setValidators(array(
      'idAdvantages'  => new sfValidatorPropelChoice(array('model' => 'Advantages', 'column' => 'idAdvantages', 'required' => false)),
      'size'          => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647)),
      'speed'         => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647)),
      'initiativeMod' => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647)),
      'defense'       => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647)),
      'armor'         => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647)),
      'health'        => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647)),
      'willpower'     => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647)),
      'morality'      => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647)),
      'hValue'        => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647)),
      'wValue'        => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647)),
    ));

    $this->widgetSchema->setNameFormat('advantages[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Advantages';
  }


}
